﻿using System;
using System.Collections.Generic;

namespace YiCheap.Core.Domain.Products
{
    public class ProductVariant:BaseEntity
    {
        private ICollection<ProductVariantShop> _shops;

        private ICollection<ProductVariantSpecificationAttribute> _productSpecificationAttributes;
       

        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public virtual string Name { get; set; }

        /// <summary>
        /// Gets or sets the price
        /// </summary>
        public virtual decimal Price { get; set; }
        
        /// <summary>
        /// Gets or sets the weight
        /// </summary>
        public virtual decimal Weight { get; set; }

        /// <summary>
        /// Gets or sets the length
        /// </summary>
        public virtual decimal Length { get; set; }

        /// <summary>
        /// Gets or sets the width
        /// </summary>
        public virtual decimal Width { get; set; }

        /// <summary>
        /// Gets or sets the height
        /// </summary>
        public virtual decimal Height { get; set; }

        /// <summary>
        /// Gets or sets the picture identifier
        /// </summary>
        public virtual int PictureId { get; set; }


        /// <summary>
        /// Gets or sets a value indicating whether the entity is published
        /// </summary>
        public virtual bool Published { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity has been deleted
        /// </summary>
        public virtual bool Deleted { get; set; }

        /// <summary>
        /// Gets or sets the display order
        /// </summary>
        public virtual int DisplayOrder { get; set; }

        /// <summary>
        /// Gets or sets the date and time of instance creation
        /// </summary>
        public virtual DateTime CreatedOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the date and time of instance update
        /// </summary>
        public virtual DateTime UpdatedOnUtc { get; set; }


        public virtual ICollection<ProductVariantShop> Shops
        {
            get { return _shops ?? (_shops = new List<ProductVariantShop>()); }
            protected set { _shops = value; }
        }
     

        public virtual ICollection<ProductVariantSpecificationAttribute> ProductSpecificationAttributes
        {
            get { return _productSpecificationAttributes ?? (_productSpecificationAttributes = new List<ProductVariantSpecificationAttribute>()); }
            protected set { _productSpecificationAttributes = value; }
        }

        public virtual int ProductId { get; set; }

        /// <summary>
        /// Gets or sets the product
        /// </summary>
        public virtual Product Product { get; set; }


    }
}